<script>
export default {
	name: 'DialogComponent',
	props: {
		visible: {
			type: Boolean,
			default: false
		}
	},
	created() {
		console.log('dialog created');
	},
	mounted() {
		console.log('dialog mounted');
	},
	data() {
		return {};
	},
	methods: {
		close() {
			this.$emit('update:visible');
		}
	}
};
</script>

<template>
	<el-dialog :visible="visible" title="Dialog">
		<div>Dialog</div>
		<el-button type="primary" @click="close">close</el-button>
	</el-dialog>
</template>
